#!/bin/sh

git_ssh_url=$1
commit=$2
project_name=../../../../$3

if [ ! -d $project_name ]; then
    git clone $git_ssh_url
fi
cd $project_name

git fetch origin
git checkout $commit -b branch_$commit

tar zxf bora.tar.gz

supervisorctl restart main_service:*
supervisorctl restart mqtt_service
